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

Wrong Block.Header.AppHash. #1084

Closed
michalgrzegor opened this issue Oct 16, 2023 · 32 comments
Closed

Wrong Block.Header.AppHash. #1084

michalgrzegor opened this issue Oct 16, 2023 · 32 comments

Comments

@michalgrzegor
Copy link

michalgrzegor commented Oct 16, 2023

Heimdall version
0xpolygon/heimdall:1.0.2 - docker image

Environment:

  • OS (e.g. from /etc/os-release):
    Ubuntu 22.04.2 LTS

What happened:
heimdall restarts the container with the following error:
ERROR: failed to create new node: error during handshake: error on replay: Wrong Block.Header.AppHash. Expected E88FF46BB5495ABCE90E686487A364B72EA4B0B7BD967E0F012CA9E44BE4C587, got 323711A75A226372F45897B7ECF459CE54D3C60C4D22769F1EBA96A242566603
I used a script to download snapshots.(polygon wiki)

Have you tried the latest version: yes

node command runtime flags:
docker run -p 26657:26657 -p 26656:26656 -p 1317:1317 -v /mnt/volume_sfo3_01:/heimdall-home:rw --net polygon --name heimdall-node --entrypoint /usr/bin/heimdalld -d --restart unless-stopped 0xpolygon/heimdall:1.0.2 start --home=/heimdall-home --rest-server --chain=mainnet

the rollback command did not help

@monokh
Copy link

monokh commented Oct 16, 2023

Same
Have tried
heimdalld unsafe-reset-all full sync
also tried heimdalld unsafe-reset-all + Adding data from latest snapshot + syncing
After finally getting some peers, not working

Tried 0xpolygon/heimdall:1.0.2 and 0xpolygon/heimdall:1.0.1

@dsloanather
Copy link

Same issue from snapshot

@leoenes
Copy link

leoenes commented Oct 16, 2023

Same issue from snapshot here.

@rufin0615
Copy link

I'm facing the same issue from snapshot on mumbai network.

error: failed to create new node: error during handshake: error on replay: wrong block.header.apphash. expected 1b090e6f68f61416c9a8a1ddec40881ef3d2d4b204af8412f2d1c46084244638, got 6cb9e54242928e6709ed202c0d71aeacd8e5f76950ac0a96916a081dd9c07cc1

@libangzhu
Copy link

Same issue from snapshot here.

@libangzhu
Copy link

libangzhu commented Oct 17, 2023

image
Wrong Block.Header.AppHash

2023-10-17T04:30:41.689670667Z ERROR: failed to create new node: error during handshake: error on replay: Wrong Block.Header.AppHash. Expected E88FF46BB5495ABCE90E686487A364B72EA4B0B7BD967E0F012CA9E44BE4C587, got 323711A75A226372F45897B7ECF459CE54D3C60C4D22769F1EBA96A242566603

@0x1un
Copy link

0x1un commented Oct 17, 2023

Same issue from snapshot here.

@suntzu93
Copy link

same issue from latest snapshot and heimdall:1.0.2 .

Oct 17 10:54:48 rpc-node3 heimdalld[2694930]: DEBUG[2023-10-17|10:54:48.571] ABI initialized                              name="[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
Oct 17 10:54:49 rpc-node3 heimdalld[2694930]: ERROR: failed to create new node: error during handshake: error on replay: Wrong Block.Header.AppHash.  Expected 41624DCED48C50E9A4F42A9CB7842C43F960F61BF766716B697EFC70BB6FA823, got 71F36A47299D38A9DB8185543F736D4639B49728DC02C72BF9ECB5D8B34353A7

@piccadil
Copy link

Same issue ver 1.0.1 from a fresh snapshot:

Oct 17, 2023 @ 09:06:19.524	panic: Failed to process committed block (15918901:8B3E80076DC0E6F21157BA7A1B775EC59B08935A188B57648E2968913B1489F5): Wrong Block.Header.AppHash.  Expected E88FF46BB5495ABCE90E686487A364B72EA4B0B7BD967E0F012CA9E44BE4C587, got 323711A75A226372F45897B7ECF459CE54D3C60C4D22769F1EBA96A242566603	

Oct 17, 2023 @ 09:06:19.511	INFO [2023-10-17|09:06:19.511] Committed state                              module=state height=15918900 txs=0 appHash=E88FF46BB5495ABCE90E686487A364B72EA4B0B7BD967E0F012CA9E44BE4C587	

Oct 17, 2023 @ 09:06:19.472	INFO [2023-10-17|09:06:19.472] Executed block                               module=state height=15918900 validTxs=0 invalidTxs=0	

Oct 17, 2023 @ 09:06:19.454	INFO [2023-10-17|09:06:19.454] Committed state                              module=state height=15918899 txs=1 appHash=1545CCE2FDCA443D8C0D6282889D136F79D17F69C4F1B570A8EF2430FAC9FD89

@libangzhu
Copy link

官方赶紧解决下,等着用呢,耽误事

@fylsan3
Copy link

fylsan3 commented Oct 18, 2023

这heimdall重启风险太高了啊.一不小心就得从头同步.rollback还没用.

@VAIBHAVJINDAL3012
Copy link
Contributor

Are you all using the respective chain flag?
chain=mainnet for mainnet
chain=mumbai for testnet

@michalgrzegor
Copy link
Author

@VAIBHAVJINDAL3012 Yes, that's exactly the flag I used.

@nining
Copy link

nining commented Oct 18, 2023

same version and the same issue here.

@libangzhu
Copy link

这heimdall重启风险太高了啊.一不小心就得从头同步.rollback还没用.

太垃圾了

@libangzhu
Copy link

Are you all using the respective chain flag? chain=mainnet for mainnet chain=mumbai for testnet

这种低级错误不会犯的,赶紧查明问题,我们都等着呢,链停了好多天了

@VAIBHAVJINDAL3012
Copy link
Contributor

Can you all please put
chain=mainnet for mainnet
chain=mumbai for testnet
inside the heimdall-config.toml file

and use the snapshot.

@VAIBHAVJINDAL3012
Copy link
Contributor

@michalgrzegor Are you using docker container?

@emberfarkas
Copy link

Same issue from snapshot here.

@emberfarkas
Copy link

i try 0.3.5 1.0.0 1.2,

2023-10-18T13:12:14.937078438Z ERROR: failed to create new node: error during handshake: error on replay: Wrong Block.Header.AppHash. Expected 41624DCED48C50E9A4F42A9CB7842C43F960F61BF766716B697EFC70BB6FA823, got 71F36A47299D38A9DB8185543F736D4639B49728DC02C72BF9ECB5D8B34353A7

@VAIBHAVJINDAL3012
Copy link
Contributor

Once your node fail with appHash you need to restore it with snapshot again.
Please make sure you are using chain flag in service file or chain flag is present is your config/heimdall-config.toml file

If you are using docker, please put the chain file inside config/heimdall-config.toml file

@piccadil
Copy link

piccadil commented Oct 18, 2023

If you are using docker, please put the chain file inside config/heimdall-config.toml file

worked for me , thanks a lot

@libangzhu
Copy link

thanks

good ,i will try

@ko0f
Copy link

ko0f commented Oct 19, 2023

Issue is resolved when adding --chain=mainnet on startup parameters, however you'll need to re-extract the snapshot again if you already had the error.

@libangzhu
Copy link

image
it's worked,

config/heimdall-config.toml

@libangzhu
Copy link

没解决的都来试试吧

@0x1un
Copy link

0x1un commented Oct 19, 2023

没解决的都来试试吧

看起来必须解压快照设置这个flag,原有的数据并不可用了?

@libangzhu
Copy link

报错之后应该就不能用了,然后你下载镜像数据之后,把这些分块的数据打包一个压缩文件之后解压,数据就完整了,这时候你在修改config/heimdall-config.toml 配置项,chain="mainnet", 就可以了

@0x1un
Copy link

0x1un commented Oct 19, 2023

报错之后应该就不能用了,然后你下载镜像数据之后,把这些分块的数据打包一个压缩文件之后解压,数据就完整了,这时候你在修改config/heimdall-config.toml 配置项,chain="mainnet", 就可以了

好的,多谢~

@monokh
Copy link

monokh commented Oct 20, 2023

adding chain param resolved my issue -
Seems this property is a new requirement in latest version - would be good if it was included in the upgrade docs

@marcello33
Copy link
Contributor

Closing the issue as resolved.

@Etherdrake
Copy link

This simple step is still not included in the documentation. I just had the same error in 0xpolygon/heimdall:1.0.3. Please update the documentation accordingly.

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

No branches or pull requests