8000 ABCI method InitChain fails if genesis file is larger than 100MB and ABCI app is started in socket mode · Issue #1729 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ABCI method InitChain fails if genesis file is larger than 100MB and ABCI app is started in socket mode #1729

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

Closed
troykessler opened this issue Dec 3, 2023 · 1 comment
Labels
abci Application blockchain interface bug Something isn't working

Comments

@troykessler
Copy link
Contributor

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.

  1. Install gaia with latest genesis version v4.2.1: https://github.com/cosmos/gaia/releases/tag/v4.2.1
  2. Init with ./gaiad init test --chain-id cosmoshub-4
  3. Install gaia genesis file
  4. Start gaia without embedded tendermint process: ./gaiad start --with-tendermint=false --transport=socket

(open new terminal)

  1. Install tendermint v0.34.9, which was used for gaia v4.2.1: https://github.com/tendermint/tendermint/releases/tag/v0.34.9
  2. 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.

@troykessler troykessler added bug Something isn't working needs-triage This issue/PR has not yet been triaged by the team. labels Dec 3, 2023
@troykessler
Copy link
Contributor Author

Openen PR #1730

@melekes melekes added abci Application blockchain interface and removed needs-triage This issue/PR has not yet been triaged by the team. labels Dec 4, 2023
@melekes melekes moved this from Todo to Ready for Review in CometBFT 2023 Dec 4, 2023
@melekes melekes closed this as completed Dec 6, 2023
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in CometBFT 2023 Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abci Application blockchain interface bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants
0