Skip to content

[Bug]: There was an issue upgrading after importing a new module #20489

@zhi-lu

Description

@zhi-lu

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

My Cosmos brothers and sisters, I encountered a big problem. Based on the version of Cosmos sdk v0.50.6, my colleagues and I added a new module. It is called the Foo module (Of course, it is not called this name, but for our hidden information. Sorry.), which works like an 'auth' or 'bank'. Now we have a Cosmos sdk v0.50.6 blockchain without Foo. I want to upgrade through Cosmovisor and introduce the Foo module into our current blockchain. We have referred to the entire process of this document https://docs.cosmos.network/main/build/tooling/cosmovisor#installation.
We have perfectly replicated the migration plan for upgrading simap from v0.47 to v0.50. Unfortunately, my migration plan failed. My migration plan code upgrades.go did this:
截屏2024-05-30 20 20 21

Meanwhile, the app.go code looks like this:
截屏2024-05-30 20 22 38
截屏2024-05-30 20 22 59
截屏2024-05-30 20 23 10

We referred to the migration and upgrade code for v0.50: https://github.com/cosmos/cosmos-sdk/blob/v0.50.0/simapp/upgrades.go

Next, I will describe the exceptions of the upgrade. After I completed the migration proposal and voting operation for the upgrade, there were two validator nodes on the chain called A and B, and their weights on the chain were consistent. We propose to upgrade at a height of 350 blocks, which is feasible. After the upgrade, blocks 351, 352, and 353 are generated on the chain. At this point, they should have reached a successful consensus, but when I stopped the B node and restarted it using the 'Cosmovisor run start' method, they showed an 'ERR suggest step: consensus deaths this block invalid'; Prevoting nil err="wrong Block. Header. AppHash `. I don't understand why a node disconnection and re-entry can cause consensus anomalies. And this blockchain will not continue to block out。
This is the relevant screenshot.
WechatIMG337
WechatIMG338

They use the same old and new software during the upgrade. Is it because I lost any code or operation that caused it? I'm baffled.

Cosmos SDK Version

v0.50.6

How to reproduce?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions