Heimdall停止后无法启动问题 Failed to start consensus state: DataCorruptionError

[2021-08-20|10:13:00.357] data has been corrupted in last height of consensus WAL module=consensus err=“DataCorruptionError[failed to read data: EOF (read: 18615, wanted: 18848)]” height=6174943
E[2021-08-20|10:13:00.357] Encountered corrupt WAL file module=consensus err=“DataCorruptionError[failed to read data: EOF (read: 18615, wanted: 18848)]”
E[2021-08-20|10:13:00.357] Please repair the WAL file before restarting module=consensus
You can attempt to repair the WAL as follows:


WALFILE=~/.tendermint/data/cs.wal/wal
cp $WALFILE ${WALFILE}.bak # backup the file
go run scripts/wal2json/main.go $WALFILE > wal.json # this will panic, but can be ignored
rm $WALFILE # remove the corrupt file
go run scripts/json2wal/main.go wal.json $WALFILE # rebuild the file without corruption

panic: Failed to start consensus state: DataCorruptionError[failed to read data: EOF (read: 18615, wanted: 18848)]

conS:
ConsensusState

conR:
ConsensusReactor

goroutine 103 [running]:
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).SwitchToConsensus(0xc00010fb80, 0xa, 0x0, 0xc001920ae0, 0x6, 0xc001920b00, 0xc, 0x5e38de, 0x117481, 0xc001af26a0, …)
/root/go/pkg/mod/github.com/maticnetwork/[email protected]/consensus/reactor.go:119 +0x297
github.com/tendermint/tendermint/blockchain/v0.(*BlockchainReactor).poolRoutine(0xc000efb180)
/root/go/pkg/mod/github.com/maticnetwork/[email protected]/blockchain/v0/reactor.go:271 +0x11ed
created by github.com/tendermint/tendermint/blockchain/v0.(*BlockchainReactor).OnStart
/root/go/pkg/mod/github.com/maticnetwork/[email protected]/blockchain/v0/reactor.go:118 +0x87