Skip to content

Commit

Permalink
module version bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Jun 28, 2024
1 parent de5e0ad commit 8cf7637
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions app/upgrades/v4/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"fmt"
"strconv"

jklminttypes "github.com/jackalLabs/canine-chain/v4/x/jklmint/types"

notificationsmoduletypes "github.com/jackalLabs/canine-chain/v4/x/notifications/types"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
Expand Down Expand Up @@ -193,6 +195,7 @@ func (u *Upgrade) Handler() upgradetypes.UpgradeHandler {
ctx.Logger().Info("\nNow updating the Jackal Protocol to:\n\n █████╗ ██████╗ █████╗ ██████╗██╗ █████╗ \n██╔══██╗██╔════╝██╔══██╗██╔════╝██║██╔══██╗\n███████║██║ ███████║██║ ██║███████║\n██╔══██║██║ ██╔══██║██║ ██║██╔══██║\n██║ ██║╚██████╗██║ ██║╚██████╗██║██║ ██║\n╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝╚═╝╚═╝ ╚═╝\n \n")

fromVM[storagemoduletypes.ModuleName] = 7
fromVM[jklminttypes.ModuleName] = 6

fidMerkleMap := UpdateFiles(ctx, u.sk)

Expand Down
4 changes: 2 additions & 2 deletions x/jklmint/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ func NewMigrator(keeper Keeper, legacy exported.Subspace) Migrator {
}
}

// Migrate1to2 migrates from version 2 to 3.
// Migrate2to3 migrates from version 2 to 3.
func (m Migrator) Migrate2to3(ctx sdk.Context) error {
return v210.MigrateStore(ctx, &m.k.paramSpace)
}

// Migrate1to2 migrates from version 2 to 3.
// Migrate3to4 migrates from version 2 to 3.
func (m Migrator) Migrate3to4(ctx sdk.Context) error {
return v3.MigrateStore(ctx, m.legacySubspace, &m.k.paramSpace)
}
6 changes: 3 additions & 3 deletions x/jklmint/legacy/v3/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func MigrateStore(ctx sdk.Context, legacy exported.Subspace, paramsSubspace *par
DevGrantsRatio: 8,
StorageProviderRatio: 12,
StakerRatio: 80,
TokensPerBlock: currParams.TokensPerBlock, // TODO: Double check this
MintDecrease: 6, // TODO: Double check this
StorageStipendAddress: types.DefaultStorageStipend,
TokensPerBlock: 3442500,
MintDecrease: 6,
StorageStipendAddress: "jkl1scpjepy0vgdpku7dwev20yxmvcezakv24k9arn",
}

paramsSubspace.SetParamSet(ctx, &t)
Expand Down
2 changes: 1 addition & 1 deletion x/jklmint/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
}

// ConsensusVersion implements ConsensusVersion.
func (AppModule) ConsensusVersion() uint64 { return 4 }
func (AppModule) ConsensusVersion() uint64 { return 5 }

// BeginBlock executes all ABCI BeginBlock logic respective to the capability module.
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
Expand Down
2 changes: 1 addition & 1 deletion x/storage/legacy/v5/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func MigrateStore(ctx sdk.Context, legacySubspace exported.Subspace, paramsSubsp
PricePerTbPerMonth: 15,
AttestFormSize: 5,
AttestMinToPass: 3,
CollateralPrice: 10_000_000_000,
CollateralPrice: currParams.CollateralPrice,
CheckWindow: 100,
ReferralCommission: 25,
PolRatio: 40,
Expand Down
2 changes: 1 addition & 1 deletion x/storage/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
}

// ConsensusVersion implements ConsensusVersion.
func (AppModule) ConsensusVersion() uint64 { return 6 }
func (AppModule) ConsensusVersion() uint64 { return 7 }

// BeginBlock executes all ABCI BeginBlock logic respective to the capability module.
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { // Every x blocks we check for proven deals
Expand Down

0 comments on commit 8cf7637

Please sign in to comment.