Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

panic "wrong Block.Header.AppHash" happened when restart a node with snapshot #672

Closed
KamiD opened this issue Dec 24, 2020 · 1 comment · Fixed by #673
Closed

panic "wrong Block.Header.AppHash" happened when restart a node with snapshot #672

KamiD opened this issue Dec 24, 2020 · 1 comment · Fixed by #673

Comments

@KamiD
Copy link

KamiD commented Dec 24, 2020

System info: [Include Ethermint commit, operating system name, and other relevant details]

Steps to reproduce:
Reproduce every time

  1. [First Step]
  • Deploy 4 node with ethermintd
  1. [Second Step]
  • Publish some contract and call it on ethermint
  1. [and so on...]
  • Restart one of nodes

Expected behavior: [What you expected to happen]
Node runs well

Actual behavior: [What actually happened]
Panic happened, following code is error logs:

panic: Failed to process committed block (343:9150EFAEF4EBF5D9FF30BC07677883BBB69CC2FAE0AFB4FA38E27B6A2CE3C983): wrong Block.Header.AppHash.  Expected B54B85040B67913D1591D3AB62BE9F439852C67FD6C237BCACC3CA247B10C977, got AB17E63A9276B773384161A5A06A63897DC3985F30CF1EA7BF19309720CFF20C

goroutine 165 [running]:
github.com/tendermint/tendermint/blockchain/v0.(*BlockchainReactor).poolRoutine(0xc0001876c0)
        /Users/oker/work/go/pkg/mod/github.com/okex/tendermint@v0.33.9-okexchain1/blockchain/v0/reactor.go:349 +0x12ed
created by github.com/tendermint/tendermint/blockchain/v0.(*BlockchainReactor).OnStart
        /Users/oker/work/go/pkg/mod/github.com/okex/tendermint@v0.33.9-okexchain1/blockchain/v0/reactor.go:118 +0x84

Additional info: [Include gist of relevant config, logs, etc.]

@KamiD
Copy link
Author

KamiD commented Dec 24, 2020

A simple analyzes:

k.Bloom = big.NewInt(0)

k.TxCount = 0

You should not change keeper.Bloom and keeper.TxCount during calling function of BeginBlock, Cause that AppModule was a struct(not a pointer), when the function AppModule.BeginBlock has called, The actually value in keeper will not changed by =

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant