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

dynamically update user redemption records during unbonding #1053

Merged
merged 49 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d546f72
added shell for upgrade handler
sampocs Dec 14, 2023
dc60756
first pass at upgrade handler
sampocs Dec 14, 2023
9fc442b
first pass at upgrade handler
sampocs Dec 14, 2023
f2e1fff
Merge branch 'main' into v17-upgrade-handler
sampocs Dec 14, 2023
9b7bf0d
Merge branch 'v17-upgrade-handler' of github.com:Stride-Labs/stride i…
sampocs Dec 14, 2023
040d093
added unit tests
sampocs Dec 19, 2023
d5648a8
add unit test for full upgrade
sampocs Dec 19, 2023
9ced924
updated rate limits
sampocs Dec 19, 2023
e95161d
nit comments
sampocs Dec 20, 2023
70ce965
Update app/upgrades/v17/upgrades.go
sampocs Jan 9, 2024
4871a9c
updated rate limits
sampocs Jan 9, 2024
1926074
Merge branch 'v17-upgrade-handler' of github.com:Stride-Labs/stride i…
sampocs Jan 9, 2024
71e9917
removed inner RR updates
sampocs Jan 9, 2024
9424189
nit
sampocs Jan 9, 2024
d7204b8
added param migration
sampocs Jan 9, 2024
6d9b9ab
Merge branch 'main' into v17-upgrade-handler
sampocs Jan 9, 2024
9de0cc1
update user redemption rates dynamically
shellvish Jan 9, 2024
e8f2d0a
Add Prop 225 to v17 Upgrade Handler (#1044)
shellvish Jan 9, 2024
a0d29d9
make NativeAmount 0 until unbonding succeeds
shellvish Jan 9, 2024
9c45554
Add UpgradeHandler Logic
shellvish Jan 9, 2024
a71b9b4
handle failure cases for dynamic RRs
shellvish Jan 9, 2024
3e84687
bugfix
shellvish Jan 9, 2024
69a9b7b
address Riley's PR comments
shellvish Jan 10, 2024
7152e6e
first pass at refactor
sampocs Jan 10, 2024
e845e1a
added another function
sampocs Jan 10, 2024
9f56e82
used map
sampocs Jan 10, 2024
8ac6eaa
added back in native token amount during redemption and removed from …
sampocs Jan 10, 2024
c3ff1f8
addressed vishal PR comments
sampocs Jan 10, 2024
c07f40d
fixed unit tests for GetTotalUnbondAmount
sampocs Jan 10, 2024
16a9d87
fixed broken unit tests
sampocs Jan 10, 2024
9f5ee76
added cache context wrapper for unbonding
sampocs Jan 10, 2024
0afc25d
added unit tests for records helpers
sampocs Jan 10, 2024
e8f284a
addressed riley PR comments
sampocs Jan 10, 2024
8da63cc
addressed aidan nit comments
sampocs Jan 10, 2024
2e36b4e
added unit tests for refresh functions
sampocs Jan 11, 2024
4854e70
nit
sampocs Jan 11, 2024
5e4d667
added clarifying comment
sampocs Jan 11, 2024
f65bae9
send disable tokenization tx for delegation account on hub (#1045)
ethan-stride Jan 11, 2024
4c199dc
fixed unit test
sampocs Jan 11, 2024
ccedebe
Merge branch 'v17-upgrade-handler' of github.com:Stride-Labs/stride i…
sampocs Jan 11, 2024
d52d789
Merge branch 'main' into v17-upgrade-handler
sampocs Jan 11, 2024
8fbd60a
added pfm store key
sampocs Jan 11, 2024
6e92ff0
addressed aidan PR comments
sampocs Jan 11, 2024
5f546ec
nit
sampocs Jan 11, 2024
37251be
fixed upgrade handler unit tests
sampocs Jan 11, 2024
ba8e948
Merge branch 'main' into v17-upgrade-handler
sampocs Jan 11, 2024
b08635f
Merge branch 'v17-upgrade-handler' into dynamic-unbonding-rr-refactor
sampocs Jan 11, 2024
8c5950f
unittest MigrateUnbondingRecords (#1056)
asalzmann Jan 11, 2024
5632a2f
Merge branch 'main' into dynamic-unbonding-rr-refactor
sampocs Jan 11, 2024
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
6 changes: 5 additions & 1 deletion app/apptesting/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ func (s *AppTestHelper) MockICAChannel(connectionId, channelId, owner, address s

func (s *AppTestHelper) ConfirmUpgradeSucceededs(upgradeName string, upgradeHeight int64) {
s.Ctx = s.Ctx.WithBlockHeight(upgradeHeight - 1)
plan := upgradetypes.Plan{Name: upgradeName, Height: upgradeHeight}
plan := upgradetypes.Plan{
Name: upgradeName,
Height: upgradeHeight,
}

err := s.App.UpgradeKeeper.ScheduleUpgrade(s.Ctx, plan)
s.Require().NoError(err)
_, exists := s.App.UpgradeKeeper.GetUpgradePlan(s.Ctx)
Expand Down
14 changes: 14 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
v14 "github.com/Stride-Labs/stride/v16/app/upgrades/v14"
v15 "github.com/Stride-Labs/stride/v16/app/upgrades/v15"
v16 "github.com/Stride-Labs/stride/v16/app/upgrades/v16"
v17 "github.com/Stride-Labs/stride/v16/app/upgrades/v17"
v2 "github.com/Stride-Labs/stride/v16/app/upgrades/v2"
v3 "github.com/Stride-Labs/stride/v16/app/upgrades/v3"
v4 "github.com/Stride-Labs/stride/v16/app/upgrades/v4"
Expand Down Expand Up @@ -216,6 +217,19 @@ func (app *StrideApp) setupUpgradeHandlers(appOpts servertypes.AppOptions) {
),
)

// v17 upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(
v17.UpgradeName,
v17.CreateUpgradeHandler(
app.mm,
app.configurator,
app.DistrKeeper,
app.InterchainqueryKeeper,
app.RatelimitKeeper,
app.StakeibcKeeper,
),
)

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(fmt.Errorf("Failed to read upgrade info from disk: %w", err))
Expand Down
Loading