Skip to content

Commit

Permalink
feat: panic at columbus genesis (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
inon-man authored Feb 17, 2023
1 parent f429a07 commit 4a03197
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (ante) [#103](https://github.com/classic-terra/core/pull/103) Add burn tax split logic
* (ante) [#107](https://github.com/classic-terra/core/pull/107) Burn Tax Whitelist
* (build) [#118](https://github.com/classic-terra/core/pull/118) localnet for Apple Silicon
* (app) [#128](https://github.com/classic-terra/core/pull/128) Panic at InitChainer for the Columbus mainnet

### Improvements
* (build) [#93](https://github.com/classic-terra/core/pull/93) Use golang 1.18 and fix ad-hoc security vulnerabilities
Expand Down
5 changes: 4 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a
}

// trigger SetModuleVersionMap in upgrade keeper at the VersionMapEnableHeight
if ctx.BlockHeight() == core.VersionMapEnableHeight {
if ctx.ChainID() == core.ColumbusChainID && ctx.BlockHeight() == core.VersionMapEnableHeight {
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())
}

Expand All @@ -647,6 +647,9 @@ func (app *TerraApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abc
if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
if ctx.ChainID() == core.ColumbusChainID {
panic("Must use v1.0.x for importing the columbus genesis (https://github.com/classic-terra/core/releases/)")
}
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())
return app.mm.InitGenesis(ctx, app.appCodec, genesisState)
}
Expand Down

0 comments on commit 4a03197

Please sign in to comment.