Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: panic at columbus genesis #128

Merged
merged 3 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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