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 fails from v0.45.4 to v0.46.0-rc1 #12027

Closed
4 tasks
kaustubhkapatral opened this issue May 24, 2022 · 2 comments · Fixed by #12028
Closed
4 tasks

Software upgrade fails from v0.45.4 to v0.46.0-rc1 #12027

kaustubhkapatral opened this issue May 24, 2022 · 2 comments · Fixed by #12028

Comments

@kaustubhkapatral
Copy link
Contributor

Summary of Bug

While testing the upgrade path from v0.45.x to v0.46-0-rc1, node crashes with a tendermint error before applying the upgrade handler.

7:01AM INF ABCI Handshake App Info hash="\b\x11\x17�%L\x13gY�\x19v\x0e�.ء|w�X���\uea72,\x10I��" height=269 module=consensus protocol-version=0
 software-version=0.46.0-rc1
7:01AM INF ABCI Replay Blocks appHeight=269 module=consensus stateHeight=0 storeHeight=0
panic: state.AppHash does not match AppHash after replay. Got
081117C0254C136759D719760E842ED8A17C779C58B6C7C0EEA9B22C1049F7A1, expected .

State: {{{11 0} 0.35.0-unreleased} test 1 0 :0:000000000000 2022-05-24 06:09:21.547165957 +0000 UTC ValidatorSet{
  Proposer: nil-Validator
  Validators:

} ValidatorSet{
  Proposer: nil-Validator
  Validators:

} ValidatorSet{
  Proposer: nil-Validator
  Validators:

} 1 {{22020096 -1} {100000 48h0m0s 1048576} {[ed25519]} {0}} 1 [] []}

Did you reset Tendermint without resetting your application's data?

goroutine 1 [running]:
github.com/tendermint/tendermint/internal/consensus.assertAppHashEqualsOneFromState({_, _, _}, {{{0xb, 0x0}, {0x201a9d5, 0x11}}, {0xc0008acb0c, 0x4}, 0x1, ...})

Upgrade height during testing was kept at 270. Once the binary of v0.46.0-rc1 was built and node was restarted, it crashed during the replay of the previous block. It did not corrupt the db of the node as the upgrade handler was not applied and could be skipped by rolling back to v0.45.4 and using --unsafe-skip-upgrades <height>.

Version

v0.46.0-rc1

Steps to Reproduce

  • Start a local node with v0.45.4 and submit a software upgrade proposal with the name v045-to-v046.
  • Once the node stops at the upgrade height, build the binary from v0.46.0-rc1 and restart the node.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@amaury1093
Copy link
Contributor

I confirm I ran into the same issue while doing a localnet upgrade.

@amaury1093
Copy link
Contributor

@kaustubhkapatral See https://github.com/tendermint/tendermint/blob/master/UPGRADING.md#database-key-format-changes, you need to migrate the TM db keys first.

I created #12028 to add this command to the SDK.

@mergify mergify bot closed this as completed in #12028 May 30, 2022
mergify bot pushed a commit that referenced this issue May 30, 2022
## Description

closes #12027 

- Add `tendermint key-migrate` subcommand
- Fix in-place store migrations

Test:
- on v0.45 node, make a proposal to update software, make it pass
- wait for node to halt
- on v0.46 binary, run `simd tendermint key-migrate`
- on v0.46 binary, run `simd start --mode validator`
- make sure the v0.46 node runs correctly



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
mergify bot pushed a commit that referenced this issue May 30, 2022
## Description

closes #12027

- Add `tendermint key-migrate` subcommand
- Fix in-place store migrations

Test:
- on v0.45 node, make a proposal to update software, make it pass
- wait for node to halt
- on v0.46 binary, run `simd tendermint key-migrate`
- on v0.46 binary, run `simd start --mode validator`
- make sure the v0.46 node runs correctly

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit ca0b8f9)

# Conflicts:
#	simapp/upgrades.go
alexanderbez pushed a commit that referenced this issue May 30, 2022
* fix: Fix v0.45->v0.46 migration (#12028)

## Description

closes #12027

- Add `tendermint key-migrate` subcommand
- Fix in-place store migrations

Test:
- on v0.45 node, make a proposal to update software, make it pass
- wait for node to halt
- on v0.46 binary, run `simd tendermint key-migrate`
- on v0.46 binary, run `simd start --mode validator`
- make sure the v0.46 node runs correctly

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit ca0b8f9)

# Conflicts:
#	simapp/upgrades.go

* fix conflicts

* Update changelog

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
gsk967 pushed a commit to vulcanize/cosmos-sdk that referenced this issue Jun 21, 2022
* fix: Fix v0.45->v0.46 migration (cosmos#12028)

closes cosmos#12027

- Add `tendermint key-migrate` subcommand
- Fix in-place store migrations

Test:
- on v0.45 node, make a proposal to update software, make it pass
- wait for node to halt
- on v0.46 binary, run `simd tendermint key-migrate`
- on v0.46 binary, run `simd start --mode validator`
- make sure the v0.46 node runs correctly

---

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit ca0b8f9)

* fix conflicts

* Update changelog

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this issue May 22, 2023
## Description

closes cosmos#12027 

- Add `tendermint key-migrate` subcommand
- Fix in-place store migrations

Test:
- on v0.45 node, make a proposal to update software, make it pass
- wait for node to halt
- on v0.46 binary, run `simd tendermint key-migrate`
- on v0.46 binary, run `simd start --mode validator`
- make sure the v0.46 node runs correctly



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this issue Sep 28, 2024
* fix: Fix v0.45->v0.46 migration (cosmos#12028)

## Description

closes cosmos#12027

- Add `tendermint key-migrate` subcommand
- Fix in-place store migrations

Test:
- on v0.45 node, make a proposal to update software, make it pass
- wait for node to halt
- on v0.46 binary, run `simd tendermint key-migrate`
- on v0.46 binary, run `simd start --mode validator`
- make sure the v0.46 node runs correctly

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit ca0b8f9)

# Conflicts:
#	simapp/upgrades.go

* fix conflicts

* Update changelog

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants