Skip to content

Commit

Permalink
chore: v2 upgrade params (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler authored Feb 24, 2025
1 parent 279189c commit 9c5e774
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/upgrades/v2_0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ func CreateUpgradeHandler(
// Run Bundles Merkle Roots migrations
bundlesKeeper.SetBundlesMigrationUpgradeHeight(sdkCtx, uint64(sdkCtx.BlockHeight()))
UpgradeRuntimes(sdkCtx, poolKeeper)
UpdateUploadIntervals(sdkCtx, poolKeeper)

// TODO: update coin weights and storage cost for mainnet

// Set MultiCoinRewards and Withdraw address for the KYVE Foundation
if sdkCtx.ChainID() == "kyve-1" {
Expand Down Expand Up @@ -216,6 +219,7 @@ func SetPoolParams(ctx sdk.Context, poolKeeper *poolkeeper.Keeper) {

if ctx.ChainID() == "kyve-1" {
params.ProtocolInflationShare = math.LegacyMustNewDecFromStr("0.4")
params.MaxVotingPowerPerPool = math.LegacyNewDec(1).QuoInt64(3)
}

poolKeeper.SetParams(ctx, params)
Expand Down Expand Up @@ -403,3 +407,14 @@ func UpgradeRuntimes(sdkCtx sdk.Context, poolKeeper *poolkeeper.Keeper) {
})
}
}

func UpdateUploadIntervals(sdkCtx sdk.Context, poolKeeper *poolkeeper.Keeper) {
if sdkCtx.ChainID() == "kyve-1" {
for _, pool := range poolKeeper.GetAllPools(sdkCtx) {
if pool.Id == 4 || pool.Id == 8 || pool.Id == 10 {
pool.UploadInterval = 120
poolKeeper.SetPool(sdkCtx, pool)
}
}
}
}

0 comments on commit 9c5e774

Please sign in to comment.