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

Software upgrade is failing with mainnet export #1175

Closed
4 tasks
kaustubhkapatral opened this issue Jun 9, 2022 · 1 comment · Fixed by #1180
Closed
4 tasks

Software upgrade is failing with mainnet export #1175

kaustubhkapatral opened this issue Jun 9, 2022 · 1 comment · Fixed by #1180
Assignees
Labels
Type: Bug Something isn't working

Comments

@kaustubhkapatral
Copy link
Contributor

Summary of Bug

Software upgrade is not being applied and the nodes are panicking while testing out the patch on a devnet with mainnet export

Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF starting ABCI with Tendermint
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting multiAppConn service impl=multiAppConn module=proxy
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting localClient service connection=query impl=localClient module=abci-
client
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting localClient service connection=snapshot impl=localClient module=ab
ci-client
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting localClient service connection=mempool impl=localClient module=abc
i-client
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting localClient service connection=consensus impl=localClient module=a
bci-client
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting EventBus service impl=EventBus module=events
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting PubSub service impl=PubSub module=pubsub
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Starting IndexerService service impl=IndexerService module=txindex
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF ABCI Handshake App Info hash="�\x18��M��P�\t\r��\x0f��]A�mP7dO���\x00�\x16��" height=1499 module=consensus protocol-version=0 software-version=v4.0.0-beta1
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF ABCI Replay Blocks appHeight=1499 module=consensus stateHeight=1499 storeHeight=1500
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF Replay last block using real app module=consensus
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: 10:08AM INF applying upgrade "v4.0.0" at height: 1500
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: panic: not found
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: goroutine 1 [running]:
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: github.com/cosmos/cosmos-sdk/x/upgrade/keeper.Keeper.ApplyUpgrade({{0xc0004e1070, 0xc}, 0xc000e2aa80, {0x2858418, 0xc0011372c0}, {0x287e240, 0xc000ec8b50}, 0xc0001a8810, {0x2850da0, 0xc0004e7380}}, ...)
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]:         github.com/cosmos/cosmos-sdk@v0.45.0/x/upgrade/keeper/keeper.go:303 +0x499
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: github.com/cosmos/cosmos-sdk/x/upgrade.BeginBlocker({{0xc0004e1070, 0xc}, 0xc000e2aa80, {0x2858418, 0xc0011372c0}, {0x287e240, 0xc000ec8b50}, 0xc0001a8810, {0x2850da0, 0xc0004e7380}}, ...)
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]:         github.com/cosmos/cosmos-sdk@v0.45.0/x/upgrade/abci.go:59 +0x645
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: github.com/cosmos/cosmos-sdk/x/upgrade.AppModule.BeginBlock(...)
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]:         github.com/cosmos/cosmos-sdk@v0.45.0/x/upgrade/module.go:130
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: github.com/cosmos/cosmos-sdk/types/module.(*Manager).BeginBlock(_, {{0x2871218, 0xc0000521a0}, {0x2880080, 0xc000d17880}, {{0xb, 0x0}, {0xc001f18038, 0x8}, 0x5dc, ...}, ...}, ...)
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]:         github.com/cosmos/cosmos-sdk@v0.45.0/types/module/module.go:478 +0x3a2
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: github.com/regen-network/regen-ledger/v4/app.(*RegenApp).BeginBlocker(_, {{0x2871218, 0xc0000521a0}, {0x2880080, 0xc000d17880}, {{0xb, 0x0}, {0xc001f18038, 0x8}, 0x5dc, ...}, ...}, ...)
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]:         github.com/regen-network/regen-ledger/v4/app/app.go:596 +0x9e
Jun 09 10:08:15 regen-devnet-val-01 cosmovisor[74194]: github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).BeginBlock(_, {{0xc0004e9a00, 0x20, 0x2

These were the changes made in code before building the binary

root@regen-devnet-val-01:~/regen-ledger# git diff
diff --git a/app/stable_appconfig.go b/app/stable_appconfig.go
index fda225e9..2d5e5c0f 100644
--- a/app/stable_appconfig.go
+++ b/app/stable_appconfig.go
@@ -86,7 +86,7 @@ func (app *RegenApp) registerUpgradeHandlers() {
                toVersion[ecocredit.ModuleName] = ecocreditmodule.Module{}.ConsensusVersion()
 
                // recover funds for community member (regen-1 governance proposal #11)
-               if ctx.ChainID() == "regen-1" {
+               if ctx.ChainID() == "4.0-test" {
                        if err := recoverFunds(ctx, app.AccountKeeper, app.BankKeeper); err != nil {
                                return nil, err
                        }
diff --git a/x/ecocredit/migrations/v3/patch.go b/x/ecocredit/migrations/v3/patch.go
index a2e20015..0608ea97 100644
--- a/x/ecocredit/migrations/v3/patch.go
+++ b/x/ecocredit/migrations/v3/patch.go
@@ -16,7 +16,7 @@ import (
 // - update curator address for baskets
 func patchMigrate(ctx context.Context, sdkCtx sdk.Context, ss api.StateStore,
        basketStore basketapi.StateStore, oldBatchDenomToNewDenomMap map[string]string) error {
-       if sdkCtx.ChainID() == "regen-1" {
+       if sdkCtx.ChainID() == "4.0-test" {
                return patchMainnet(ctx, ss, oldBatchDenomToNewDenomMap)
        } else if sdkCtx.ChainID() == "regen-redwood-1" {
                return patchRedwood(ctx, ss, basketStore, oldBatchDenomToNewDenomMap)

Version

v4.0.0

Steps to Reproduce


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@aleem1314 aleem1314 added the Type: Bug Something isn't working label Jun 9, 2022
@aleem1314 aleem1314 added this to the v4.0 - Llangorse Upgrade milestone Jun 9, 2022
@kaustubhkapatral
Copy link
Contributor Author

Building the binary from aleem/upgrade-debug branch fixes the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants