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

[Bug]: Unstructured response for TX with invalid chain id #21945

Closed
1 task done
alpe opened this issue Sep 27, 2024 · 2 comments
Closed
1 task done

[Bug]: Unstructured response for TX with invalid chain id #21945

alpe opened this issue Sep 27, 2024 · 2 comments
Labels

Comments

@alpe
Copy link
Contributor

alpe commented Sep 27, 2024

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

This affects app v2 only:

A TX with invalid chain-id panics in RPC HTTP handler err="CheckTx

Response: "error in json rpc client, with http response metadata: (Status: 500 Internal Server Error, Protocol HTTP/1.1). RPC error -32603 - Internal error: CheckTx request for tx EC09A7FE0BC33754515EC573F3709C194CBBD2A54757328BA74976665A4813FC failed: failed to run tx validator for validate: signature verification failed; please verify account number (1) and chain-id (testing): (unable to verify single signer signature 'b2aa6bd3374fb1f6142413d455eb4ff08b7fa0e2864087f5203e7cc62f2428533094ae9cee999a34eab3c26584ed8120ee8f38dc5287496774b32e63cd5f626e' for signBytes '0a92010a8d010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126d0a2d636f736d6f7331346778336867383577646739667a7a63353330646d7873757074367435327172616368357136122d636f736d6f733164766436746834346574716365636d6c7072726a6c6a65677632326d6a35653772667763366d1a0d0a057374616b651204313030302a0012640a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2102677383b7df192d476d664dbb7c3b00b8a74153365bdbb9c50d357e9d777cab4912040a020801180312100a0a0a057374616b6512013110c09a0c1a0774657374696e672001'): unauthorized [cosmos/[email protected]/x/auth/ante/sigverify.go:376]"

In the server log:

8:44AM ERR panic in RPC HTTP handler err="CheckTx request for tx 468A23C811149D22318EF88AAAB6E5F5D9EB6B68DD14975CAD193EA2E7012F65 failed: failed to run tx validator for validate: signature verification failed; please verify account number (1) and chain-id (testing): (unable to verify single signer signature 'c5c0691298e141b3bc3d6488a82dea9db39294002dc68bd3ae66db3707f3a3d1558d31cd8decb7aee8b56752e4e9fabbf893c217d3925155445d8e08f8d71734' for signBytes '0a92010a8d010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126d0a2d636f736d6f73316561767a6e326d61736737307268747138766a7a39377a70376c75713438666c757632667773122d636f736d6f73316e387879633361327a3533376a776a7636383971726e71747239676c6e6561326779327938761a0d0a057374616b651204313030302a0012640a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103380910f94a8180dafae274e830c637dbc699d0f38a4585ec8c03aacce8e306ce12040a020801180312100a0a0a057374616b6512013110c09a0c1a0774657374696e672001'): unauthorized [cosmos/[email protected]/x/auth/ante/sigverify.go:376]" module=rpc-server stack="goroutine 35406 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:26 +0x64\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.Serve.RecoverAndLogHandler.func1.2()\n\tgithub.com/cometbft/[email protected]/rpc/jsonrpc/server/http_server.go:213 +0x494\npanic({0x1038bfec0?, 0x14001738d40?})\n\truntime/panic.go:785 +0x124\ngithub.com/cometbft/cometbft/mempool.(*CListMempool).CheckTx(0x1400174a240, {0x14000b83540, 0x13d, 0x13e}, {0x0, 0x0})\n\tgithub.com/cometbft/[email protected]/mempool/clist_mempool.go:292 +0x704\ngithub.com/cometbft/cometbft/rpc/core.(*Environment).BroadcastTxSync(0x14001896488, 0x14001738160, {0x14000b83540, 0x13d, 0x13e})\n\tgithub.com/cometbft/[email protected]/rpc/core/mempool.go:43 +0x8c\nreflect.Value.call({0x1038820e0?, 0x14001fa6520?, 0x14005357528?}, {0x102f19038, 0x4}, {0x14005a38600, 0x2, 0x10191f31c?})\n\treflect/value.go:581 +0x97c\nreflect.Value.Call({0x1038820e0?, 0x14001fa6520?, 0x1b1?}, {0x14005a38600?, 0x103e185c0?, 0x1?})\n\treflect/value.go:365 +0x94\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.makeJSONRPCHandler.func5({0x103e71d00, 0x14001e8d3b0}, 0x14005a192c0)\n\tgithub.com/cometbft/[email protected]/rpc/jsonrpc/server/http_json_handler.go:109 +0xa10\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.handleInvalidJSONRPCPaths.func6({0x103e71d00, 0x14001e8d3b0}, 0x14005a192c0)\n\tgithub.com/cometbft/[email protected]/rpc/jsonrpc/server/http_json_handler.go:140 +0xa0\nnet/http.HandlerFunc.ServeHTTP(0x14001f1dc00?, {0x103e71d00?, 0x14001e8d3b0?}, 0x14005a30c60?)\n\tnet/http/server.go:2220 +0x38\nnet/http.(*ServeMux).ServeHTTP(0x18?, {0x103e71d00, 0x14001e8d3b0}, 0x14005a192c0)\n\tnet/http/server.go:2747 +0x1b4\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.defaultHandler.ServeHTTP(...)\n\tgithub.com/cometbft/[email protected]/rpc/jsonrpc/server/http_server.go:261\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.Serve.RecoverAndLogHandler.func1({0x103e62410, 0x140053cfa40}, 0x14005a192c0)\n\tgithub.com/cometbft/[email protected]/rpc/jsonrpc/server/http_server.go:236 +0x194\nnet/http.HandlerFunc.ServeHTTP(0x103e37008?, {0x103e62410?, 0x140053cfa40?}, 0x103714940?)\n\tnet/http/server.go:2220 +0x38\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.Serve.PreChecksHandler.func2({0x103e62410, 0x140053cfa40}, 0x14005a192c0)\n\tgithub.com/cometbft/[email protected]/rpc/jsonrpc/server/http_server.go:329 +0xe8\nnet/http.HandlerFunc.ServeHTTP(0x10?, {0x103e62410?, 0x140053cfa40?}, 0x140053cfa40?)\n\tnet/http/server.go:2220 +0x38\nnet/http.serverHandler.ServeHTTP({0x103e4d778?}, {0x103e62410?, 0x140053cfa40?}, 0x6?)\n\tnet/http/server.go:3210 +0xbc\nnet/http.(*conn).serve(0x140055f0000, {0x103e763f0, 0x14000ff45a0})\n\tnet/http/server.go:2092 +0x4fc\ncreated by net/http.(*Server).Serve in goroutine 155\n\tnet/http/server.go:3360 +0x3dc\n"

Cosmos SDK Version

main

How to reproduce?

COSMOS_BUILD_OPTIONS=v2 go test -v -mod=readonly -failfast -tags='system_test' --run TestBankSendTxCmd ./... --wait-time=40s -binary=simdv2

@alpe alpe added the T:Bug label Sep 27, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Cosmos-SDK Sep 27, 2024
@julienrbrt
Copy link
Member

julienrbrt commented Sep 27, 2024

Are you using latest main? The crash from CheckTx should be gone.

@julienrbrt
Copy link
Member

The crash from checkTx has been fixed here: #21539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🥳 Done
Development

No branches or pull requests

2 participants