Skip to content

Commit

Permalink
chore: added korellia validator mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Feb 14, 2025
1 parent a82f44c commit 8b59d41
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ func New(
app.BundlesKeeper,
app.GlobalKeeper,
app.MultiCoinRewardsKeeper,
app.PoolKeeper,
),
)

Expand Down
23 changes: 20 additions & 3 deletions app/upgrades/v2_0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package v2_0
import (
"context"
"fmt"
poolkeeper "github.com/KYVENetwork/chain/x/pool/keeper"

multicoinrewardskeeper "github.com/KYVENetwork/chain/x/multi_coin_rewards/keeper"
multicoinrewardstypes "github.com/KYVENetwork/chain/x/multi_coin_rewards/types"
Expand Down Expand Up @@ -49,6 +50,7 @@ func CreateUpgradeHandler(
bundlesKeeper bundleskeeper.Keeper,
globalKeeper globalkeeper.Keeper,
multiCoinRewardsKeeper multicoinrewardskeeper.Keeper,
poolKeeper *poolkeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
sdkCtx := sdk.UnwrapSDKContext(ctx)
Expand All @@ -65,6 +67,7 @@ func CreateUpgradeHandler(
AdjustGasConfig(sdkCtx, globalKeeper)

SetMultiCoinRewardsParams(sdkCtx, multiCoinRewardsKeeper)
SetPoolParams(sdkCtx, poolKeeper)

// TODO set withdraw address

Expand All @@ -85,6 +88,14 @@ func SetMultiCoinRewardsParams(ctx sdk.Context, multiCoinRewardsKeeper multicoin
multiCoinRewardsKeeper.SetParams(ctx, params)
}

func SetPoolParams(ctx sdk.Context, poolKeeper *poolkeeper.Keeper) {
params := poolKeeper.GetParams(ctx)

// TODO: set new mainnet inflation split

poolKeeper.SetParams(ctx, params)
}

func AdjustGasConfig(ctx sdk.Context, globalKeeper globalkeeper.Keeper) {
params := globalKeeper.GetParams(ctx)
params.MinGasPrice = math.LegacyMustNewDecFromStr("2")
Expand All @@ -100,15 +111,19 @@ func AdjustGasConfig(ctx sdk.Context, globalKeeper globalkeeper.Keeper) {
}
params.GasRefunds = []globalTypes.GasRefund{
{
Type: "kyve.bundles.v1beta1.SubmitBundleProposal",
Type: "kyve.bundles.v1beta1.MsgSubmitBundleProposal",
Fraction: math.LegacyMustNewDecFromStr("0.95"),
},
{
Type: "kyve.bundles.v1beta1.MsgVoteBundleProposal",
Fraction: math.LegacyMustNewDecFromStr("0.95"),
},
{
Type: "kyve.bundles.v1beta1.VoteBundleProposal",
Type: "kyve.bundles.v1beta1.MsgSkipUploaderRole",
Fraction: math.LegacyMustNewDecFromStr("0.95"),
},
{
Type: "kyve.bundles.v1beta1.SkipUploaderRole",
Type: "kyve.bundles.v1beta1.MsgClaimUploaderRole",
Fraction: math.LegacyMustNewDecFromStr("0.95"),
},
}
Expand Down Expand Up @@ -144,6 +159,8 @@ func migrateProtocolStakers(ctx sdk.Context, delegationKeeper delegationkeeper.K
validatorMapping = ValidatorMappingsMainnet
} else if ctx.ChainID() == "kaon-1" {
validatorMapping = ValidatorMappingsKaon
} else if ctx.ChainID() == "korellia-2" {
validatorMapping = ValidatorMappingsKorellia
}

totalMigratedStake := uint64(0)
Expand Down
7 changes: 7 additions & 0 deletions app/upgrades/v2_0/validator-proofs/korellia/Validator-EU.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Validator-EU",
"consensus_address": "kyvevaloper1ghpmzfuggm7vcruyhfzrczl4aczy8gas8guslh",
"protocol_address": "kyve1zxlk3x50re5rhz985gcx8pm73whqnutg8ptnkz",
"proof_1": "A7A27728A03B1052B4B32D802920BBDB1E7B8FB549000A8ECE571F554513B59E",
"proof_2": "11B9EFAA0F3BF895F5E6D0FB4EAD66422552A31BADC1AE51C850AA1B8F59F518"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Validator-OVH",
"consensus_address": "kyvevaloper1af699xwpa6z6hek648p2c08hupd4j2knz22atl",
"protocol_address": "kyve1zuzyh0c0zvxry42dpqc79gu3ssukpfzg47uzrc",
"proof_1": "3131A86723482046AEA2034D23D4E125BDC749D72C00F16D47E99AD78CF6971A",
"proof_2": "54B6CC415720BD3FF573ACCC412043EF40399D5E1954ADA948F5044729B5436F"
}
7 changes: 7 additions & 0 deletions app/upgrades/v2_0/validator-proofs/korellia/Validator-US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Validator-US",
"consensus_address": "kyvevaloper1p6ctexlukvllyruwnyfhh2cvdwqggz95yzqxe9",
"protocol_address": "kyve1tg9rc2rwzu3ytvkdjh4mpe4k46n2eykpdv46nw",
"proof_1": "C05CBE4E1FB1006C9FCF12713889D69012532C436C5CD3B96715143F8C5191B0",
"proof_2": "56C4CCDA3953388FCB26B7C8841B9F4D1718DA571B833E54FF6523B959A15C55"
}
3 changes: 3 additions & 0 deletions app/upgrades/v2_0/validator_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func init() {

ValidatorMappingsMainnet = parseDirectory("validator-proofs/mainnet")
ValidatorMappingsKaon = parseDirectory("validator-proofs/kaon")
ValidatorMappingsKorellia = parseDirectory("validator-proofs/korellia")
}

type ValidatorMapping struct {
Expand All @@ -47,3 +48,5 @@ type ValidatorMapping struct {
var ValidatorMappingsMainnet []ValidatorMapping

var ValidatorMappingsKaon []ValidatorMapping

var ValidatorMappingsKorellia []ValidatorMapping

0 comments on commit 8b59d41

Please sign in to comment.