ycryptx / chaincannon

A blockchain benchmarking tool written in Golang for Cosmos-SDK
Apache License 2.0
2 stars 0 forks source link

error reading server preface: http2: frame too large #1

Open 99Kies opened 10 months ago

ycryptx commented 10 months ago

Can you include more information to help me reproduce this error?

99Kies commented 10 months ago

I'm actually testing my own testnet.

grpc: vota-testnet-grpc.dorafactory.org rpc: vota-testnet-rpc.dorafactory.org

chaincannon -chain cosmos -endpoint vota-testnet-grpc.dorafactory.org:443 -duration 60 -tx-file ./example/cosmos/data/run1.json  -tx-file ./example/cosmos/data/run3.json -tx-file ./example/cosmos/data/run4.json
ycryptx commented 10 months ago

@99Kies Could you also include the full error log you get?

99Kies commented 10 months ago

sure

$ chaincannon -chain cosmos -endpoint vota-testnet-grpc.dorafactory.org:443 -duration 60 -tx-file ./example/cosmos/data/run1.json  -tx-file ./example/cosmos/data/run3.json -tx-file ./example/cosmos/data/run4.json
   0% |                                                                                                                            | (0/100, 0 it/hr) [0s:0s]2023-12-04T19:50:49.670+0800     ERROR   cosmos/handle.go:111    failed to broadcast transaction: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: http2: frame too large"
github.com/ycryptx/chaincannon/pkg/cosmos.Run
        /Users/feng/Desktop/chaincannon/pkg/cosmos/handle.go:111
2023-12-04T19:50:49.670+0800    ERROR   cosmos/handle.go:111    failed to broadcast transaction: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: http2: frame too large"
github.com/ycryptx/chaincannon/pkg/cosmos.Run
        /Users/feng/Desktop/chaincannon/pkg/cosmos/handle.go:111
2023-12-04T19:50:49.670+0800    ERROR   cosmos/handle.go:111    failed to broadcast transaction: rpc error: code = Canceled desc = grpc: the client connection is closing
github.com/ycryptx/chaincannon/pkg/cosmos.Run
        /Users/feng/Desktop/chaincannon/pkg/cosmos/handle.go:111
 100% |█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (1/100, 3 it/s)

█▀▀ █░█ ▄▀█ █ █▄░█ █▀▀ ▄▀█ █▄░█ █▄░█ █▀█ █▄░█
█▄▄ █▀█ █▀█ █ █░▀█ █▄▄ █▀█ █░▀█ █░▀█ █▄█ █░▀█

+------------+------+------+-------+------+---------+---------+------+-------+
|    STAT    | 2.5% | 50%  | 97.5% | 99%  |   AVG   |  STDEV  | MAX  | COUNT |
+------------+------+------+-------+------+---------+---------+------+-------+
| Tx         | 0 ms | 0 ms | 0 ms  | 0 ms | 0.00 ms | 0.00 ms | 0 ms |     0 |
| Latency    |      |      |       |      |         |         |      |       |
+------------+------+------+-------+------+---------+---------+------+-------+
| Block      | 0 ms | 0 ms | 0 ms  | 0 ms | 0.00 ms | 0.00 ms | 0 ms |     0 |
| Time       |      |      |       |      |         |         |      |       |
+------------+------+------+-------+------+---------+---------+------+-------+
| TPS        |    0 |    0 |     0 |    0 |    0.00 |    0.00 |    0 |
+------------+------+------+-------+------+---------+---------+------+-------+

Benchmark ran 3 concurrent processes
Executed 0 txs and took 0.172948 seconds%                             
ycryptx commented 10 months ago

@99Kies What's the Tendermint RPC endpoint (including port #) for your node?

99Kies commented 10 months ago

@ycryptx rpc: https://vota-testnet-rpc.dorafactory.org:443

ycryptx commented 10 months ago

@99Kies I just merged a potential fix, please pull the latest master and run make install

Then call:

chaincannon -chain cosmos -endpoint vota-testnet-grpc.dorafactory.org:443 -tendermintEndpoint vota-testnet-rpc.dorafactory.org:443 -duration 60 -tx-file ./example/cosmos/data/run1.json  -tx-file ./example/cosmos/data/run3.json -tx-file ./example/cosmos/data/run4.json

I added a flag that should have been there before (tendermintEndpoint)

99Kies commented 10 months ago

Bro, Can you run it successfully?

I have same error.

$ chaincannon -chain cosmos -endpoint vota-testnet-grpc.dorafactory.org:443 -tendermintEndpoint 18.139.226.67:26657 -duration 60 -tx-file ./example/cosmos/data/run1.json  -tx-file ./example/cosmos/data/run3.json -tx-file ./example/cosmos/data/run4.json
   0% |                                                                            | (0/100, 0 it/hr) [0s:0s]2023-12-04T23:01:53.001+0800     ERROR   cosmos/handle.go:111    failed to broadcast transaction: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: http2: frame too large"
github.com/ycryptx/chaincannon/pkg/cosmos.Run
        /Users/feng/Desktop/dora-work/new_support/chaincannon/pkg/cosmos/handle.go:111
2023-12-04T23:01:53.001+0800    ERROR   cosmos/handle.go:111    failed to broadcast transaction: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: http2: frame too large"
github.com/ycryptx/chaincannon/pkg/cosmos.Run
        /Users/feng/Desktop/dora-work/new_support/chaincannon/pkg/cosmos/handle.go:111
2023-12-04T23:01:53.001+0800    ERROR   cosmos/handle.go:111    failed to broadcast transaction: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: http2: frame too large"
github.com/ycryptx/chaincannon/pkg/cosmos.Run
        /Users/feng/Desktop/dora-work/new_support/chaincannon/pkg/cosmos/handle.go:111
 100% |█████████████████████████████████████████████████████████████████████████████| (1/100, 2 it/s)

█▀▀ █░█ ▄▀█ █ █▄░█ █▀▀ ▄▀█ █▄░█ █▄░█ █▀█ █▄░█
█▄▄ █▀█ █▀█ █ █░▀█ █▄▄ █▀█ █░▀█ █░▀█ █▄█ █░▀█

+------------+------+------+-------+------+---------+---------+------+-------+
|    STAT    | 2.5% | 50%  | 97.5% | 99%  |   AVG   |  STDEV  | MAX  | COUNT |
+------------+------+------+-------+------+---------+---------+------+-------+
| Tx         | 0 ms | 0 ms | 0 ms  | 0 ms | 0.00 ms | 0.00 ms | 0 ms |     0 |
| Latency    |      |      |       |      |         |         |      |       |
+------------+------+------+-------+------+---------+---------+------+-------+
| Block      | 0 ms | 0 ms | 0 ms  | 0 ms | 0.00 ms | 0.00 ms | 0 ms |     0 |
| Time       |      |      |       |      |         |         |      |       |
+------------+------+------+-------+------+---------+---------+------+-------+
| TPS        |    0 |    0 |     0 |    0 |    0.00 |    0.00 |    0 |
+------------+------+------+-------+------+---------+---------+------+-------+

Benchmark ran 3 concurrent processes
Executed 0 txs and took 0.240485 seconds%  
ycryptx commented 10 months ago

@99Kies Does your chain implement the bank module?

99Kies commented 10 months ago

yes, we have. @ycryptx

ycryptx commented 10 months ago

@99Kies Are you able to run the example using the Docker-Compose example test chain? i.e.

make setup-example

In another terminal window:

make run-example
99Kies commented 10 months ago

@ycryptx I'm getting the same error.

image

99Kies commented 10 months ago

Is it somewhere in the code that limits the size of the http packet?

ycryptx commented 10 months ago

@99Kies Awesome, thanks for running that. I identified the issue: it has something to do with the OS HTTP_PROXY settings. Please pull master and run the example again and let's see if it solved things.

99Kies commented 10 months ago

It doesn't solve the problem.

image

image

ycryptx commented 10 months ago

@99Kies Is your Cosmos node deployed on the cloud behind a network interface / proxy? What's likely happening is that Chaincannon expects a grpc response but your node is responding with an HTTP packet.

99Kies commented 10 months ago

It doesn't solve the problem.

image

image

I have this problem in my local test as well.