From f0d0e7ae96e365a927dbfe712e6e6f39d5332d98 Mon Sep 17 00:00:00 2001 From: Dmitry K Date: Wed, 30 Oct 2024 18:27:19 -0700 Subject: [PATCH] fix the upgrade! --- app/upgrades/v0.0.10.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/upgrades/v0.0.10.go b/app/upgrades/v0.0.10.go index a7ab11eea..005286ca7 100644 --- a/app/upgrades/v0.0.10.go +++ b/app/upgrades/v0.0.10.go @@ -9,6 +9,7 @@ import ( cosmosTypes "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/pokt-network/poktroll/app/keepers" + prooftypes "github.com/pokt-network/poktroll/x/proof/types" ) // Upgrade_0_0_10 is the upgrade handler for v0.0.10 Alpha TestNet upgrade @@ -60,11 +61,18 @@ var Upgrade_0_0_10 = Upgrade{ // // !!!! THE UPGRADE CURRENTLY BREAKS HERE !!!! // https://gist.github.com/okdas/535bc3c0282483fef27454c70d889aa6 - proofParams := keepers.ProofKeeper.GetParams(ctx) + // proofParams := keepers.ProofKeeper.GetParams(ctx) + // Need to construct params manually due to protobuf type changes: newProofRequirementThreshold := cosmosTypes.NewCoin("upokt", math.NewInt(20000000)) newProofMissingPenalty := cosmosTypes.NewCoin("upokt", math.NewInt(320000000)) - proofParams.ProofRequirementThreshold = &newProofRequirementThreshold - proofParams.ProofMissingPenalty = &newProofMissingPenalty + newProofSubmissionFee := cosmosTypes.NewCoin("upokt", math.NewInt(1000000)) + proofParams := prooftypes.NewParams( + 0.25, + &newProofRequirementThreshold, + &newProofMissingPenalty, + &newProofSubmissionFee, + ) + err = keepers.ProofKeeper.SetParams(ctx, proofParams) if err != nil { return vm, err