-
Notifications
You must be signed in to change notification settings - Fork 780
Description
Bug Report
Setup
CometBFT version: tendermint v0.34.9 - cometbft v0.38.2
Have you tried the latest version: yes
ABCI app: Gaia, Evmos, Archway
What happened?
During the development of KSYNC, a tool to sync blocks stored on Arweave to any tendermint/cometbft based app chain, an error occured on the app every time the ABCI method InitChain was called over the socket protocol (error log below).
What did you expect to happen?
That the ABCI method InitChain can be called successfully called over the socket protocol by Tendermint/CometBFT without the app crashing.
How to reproduce it
It can be reproduced by trying to start the Gaia chain (Cosmos Hub) from genesis not in the default embedded in-process mode, but with tendermint running externally over the socket protocol.
- Install gaia with latest genesis version
v4.2.1: https://github.com/cosmos/gaia/releases/tag/v4.2.1 - Init with
./gaiad init test --chain-id cosmoshub-4 - Install gaia genesis file
- Start gaia without embedded tendermint process:
./gaiad start --with-tendermint=false --transport=socket
(open new terminal)
- Install tendermint
v0.34.9, which was used for gaiav4.2.1: https://github.com/tendermint/tendermint/releases/tag/v0.34.9 - Start tendermint:
./tendermint node --home ~/.gaia
Logs
Gaia:
4:51PM INF Waiting for new connection... module=abci-server
4:51PM INF Accepted a new connection module=abci-server
4:51PM INF Waiting for new connection... module=abci-server
4:51PM ERR Connection error err="error reading message: short buffer" module=abci-server
4:51PM ERR Connection was closed by client module=abci-server
4:51PM ERR Connection was closed by client module=abci-server
4:51PM ERR Connection was closed by client module=abci-server
Tendermint:
I[2023-12-03|16:51:52.461] ABCI Handshake App Info module=consensus height=0 hash= software-version= protocol-version=0
I[2023-12-03|16:51:52.461] ABCI Replay Blocks module=consensus appHeight=0 storeHeight=0 stateHeight=0
E[2023-12-03|16:51:52.474] Stopping abci.socketClient for error: write to buffer: write tcp 127.0.0.1:61167->127.0.0.1:26658: write: broken pipe module=abci-client connection=consensus
E[2023-12-03|16:51:52.474] Stopping abci.socketClient for error: read message: read tcp 127.0.0.1:61167->127.0.0.1:26658: read: connection reset by peer module=abci-client connection=consensus
I[2023-12-03|16:51:52.474] Stopping socketClient service module=abci-client connection=consensus impl=socketClient
E[2023-12-03|16:51:52.474] Error stopping abci.socketClient module=abci-client connection=consensus err="already stopped"
ERROR: failed to create node: error during handshake: error on replay: read message: read tcp 127.0.0.1:61167->127.0.0.1:26658: read: connection reset by peer
E[2023-12-03|16:51:52.474] consensus connection terminated. Did the application crash? Please restart tendermint module=proxy err="read message: read tcp 127.0.0.1:61167->127.0.0.1:26658: read: connection reset by peer"
Anything else we need to know
This error occurs not only for Gaia, but for every other chain where the genesis file is bigger than 100MB. And although right now this error only appears in chains which are still using Tendermint once the first chain based on CometBFT has a large genesis file this will result in the same error.