Skip to content

Commit 9c5e774

Browse files
authored
chore: v2 upgrade params (#249)
1 parent 279189c commit 9c5e774

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

app/upgrades/v2_0/upgrade.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ func CreateUpgradeHandler(
8282
// Run Bundles Merkle Roots migrations
8383
bundlesKeeper.SetBundlesMigrationUpgradeHeight(sdkCtx, uint64(sdkCtx.BlockHeight()))
8484
UpgradeRuntimes(sdkCtx, poolKeeper)
85+
UpdateUploadIntervals(sdkCtx, poolKeeper)
86+
87+
// TODO: update coin weights and storage cost for mainnet
8588

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

217220
if ctx.ChainID() == "kyve-1" {
218221
params.ProtocolInflationShare = math.LegacyMustNewDecFromStr("0.4")
222+
params.MaxVotingPowerPerPool = math.LegacyNewDec(1).QuoInt64(3)
219223
}
220224

221225
poolKeeper.SetParams(ctx, params)
@@ -403,3 +407,14 @@ func UpgradeRuntimes(sdkCtx sdk.Context, poolKeeper *poolkeeper.Keeper) {
403407
})
404408
}
405409
}
410+
411+
func UpdateUploadIntervals(sdkCtx sdk.Context, poolKeeper *poolkeeper.Keeper) {
412+
if sdkCtx.ChainID() == "kyve-1" {
413+
for _, pool := range poolKeeper.GetAllPools(sdkCtx) {
414+
if pool.Id == 4 || pool.Id == 8 || pool.Id == 10 {
415+
pool.UploadInterval = 120
416+
poolKeeper.SetPool(sdkCtx, pool)
417+
}
418+
}
419+
}
420+
}

0 commit comments

Comments
 (0)