babylonlabs-io / babylon

Other
24 stars 17 forks source link

finality-provider-power-at-height cli query panics #68

Open gusin13 opened 2 months ago

gusin13 commented 2 months ago

fp voting power query panics even though latest block height is greater than queried height

"sync_info": {
"latest_block_hash": "D803ABE34A9CBBC5E5053046BF75311171FAE441696D8874B49293432A5E3253",
"latest_app_hash": "5AEA17716636D07E85ECA032AB640217E24915994CE881EBEB4F27F8281BB48F",
"latest_block_height": "275",
"latest_block_time": "2024-09-11T19:04:51.593338299Z",
"earliest_block_hash": "B407421128FE341952A4C770635A878AD03ADB81B21D60120DB5D405EBC89C01",
"earliest_app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"earliest_block_height": "1",
"earliest_block_time": "2024-09-11T18:27:06.83623626Z",
"catching_up": false
},
root@3f71c8d9c434:/# babylond q btcstaking finality-provider-power-at-height 9d4aa67faeee2bba2e2ed0462251fc7e6095fd20ee640f568951451701a0af1e 41
Error: rpc error: code = Unknown desc =
github.com/cosmos/cosmos-sdk/baseapp.gRPCErrorToSDKError
    github.com/cosmos/cosmos-sdk@v0.50.7/baseapp/abci.go:1169
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).handleQueryGRPC
    github.com/cosmos/cosmos-sdk@v0.50.7/baseapp/abci.go:1141
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query
    github.com/cosmos/cosmos-sdk@v0.50.7/baseapp/abci.go:177
github.com/cosmos/cosmos-sdk/server.cometABCIWrapper.Query
    github.com/cosmos/cosmos-sdk@v0.50.7/server/cmt_abci.go:24
github.com/cometbft/cometbft/abci/client.(*localClient).Query
    github.com/cometbft/cometbft@v0.38.7/abci/client/local_client.go:106
github.com/cometbft/cometbft/proxy.(*appConnQuery).Query
    github.com/cometbft/cometbft@v0.38.7/proxy/app_conn.go:181
github.com/cometbft/cometbft/rpc/core.(*Environment).ABCIQuery
    github.com/cometbft/cometbft@v0.38.7/rpc/core/abci.go:22
reflect.Value.call
    reflect/value.go:596
reflect.Value.Call
    reflect/value.go:380
github.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.makeJSONRPCHandler.func3
    github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_json_handler.go:108
github.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.handleInvalidJSONRPCPaths.func4
    github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_json_handler.go:140
net/http.HandlerFunc.ServeHTTP
    net/http/server.go:2171
net/http.(*ServeMux).ServeHTTP
    net/http/server.go:2688
github.com/cometbft/cometbft/node.(*Node).startRPC.(*Cors).Handler.func9
    github.com/rs/cors@v1.8.3/cors.go:236
net/http.HandlerFunc.ServeHTTP
    net/http/server.go:2171
github.com/cometbft/cometbft/rpc/jsonrpc/server.maxBytesHandler.ServeHTTP
    github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_server.go:256
github.com/cometbft/cometbft/rpc/jsonrpc/server.Serve.RecoverAndLogHandler.func1
    github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_server.go:229
net/http.HandlerFunc.ServeHTTP
    net/http/server.go:2171
net/http.serverHandler.ServeHTTP
    net/http/server.go:3142
net/http.(*conn).serve
    net/http/server.go:2044
height: 41: voting power table has not been updated: unknown request
Usage:
  babylond query btcstaking finality-provider-power-at-height [fp_btc_pk_hex] [height] [flags]

Flags:
      --grpc-addr string   the gRPC endpoint to use for this chain
      --grpc-insecure      allow gRPC over insecure channels, if not the server must use TLS
      --height int         Use a specific height to query state at (this can error if the node is pruning state)
  -h, --help               help for finality-provider-power-at-height
      --node string        <host>:<port> to CometBFT RPC interface for this chain (default "tcp://localhost:26657")
  -o, --output string      Output format (text|json) (default "text")

Global Flags:
      --chain-id string     The network chain ID
      --home string         directory for config and data (default "/root/.babylond")
      --log_format string   The logging format (json|plain) (default "plain")
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:<level>,<key>:<level>') (default "info")
      --log_no_color        Disable colored logs
      --trace               print out full stack trace on errors

7:08PM ERR failure when running app err="rpc error: code = Unknown desc = \ngithub.com/cosmos/cosmos-sdk/baseapp.gRPCErrorToSDKError\n\tgithub.com/cosmos/cosmos-sdk@v0.50.7/baseapp/abci.go:1169\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).handleQueryGRPC\n\tgithub.com/cosmos/cosmos-sdk@v0.50.7/baseapp/abci.go:1141\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query\n\tgithub.com/cosmos/cosmos-sdk@v0.50.7/baseapp/abci.go:177\ngithub.com/cosmos/cosmos-sdk/server.cometABCIWrapper.Query\n\tgithub.com/cosmos/cosmos-sdk@v0.50.7/server/cmt_abci.go:24\ngithub.com/cometbft/cometbft/abci/client.(*localClient).Query\n\tgithub.com/cometbft/cometbft@v0.38.7/abci/client/local_client.go:106\ngithub.com/cometbft/cometbft/proxy.(*appConnQuery).Query\n\tgithub.com/cometbft/cometbft@v0.38.7/proxy/app_conn.go:181\ngithub.com/cometbft/cometbft/rpc/core.(*Environment).ABCIQuery\n\tgithub.com/cometbft/cometbft@v0.38.7/rpc/core/abci.go:22\nreflect.Value.call\n\treflect/value.go:596\nreflect.Value.Call\n\treflect/value.go:380\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.makeJSONRPCHandler.func3\n\tgithub.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_json_handler.go:108\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.handleInvalidJSONRPCPaths.func4\n\tgithub.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_json_handler.go:140\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2171\nnet/http.(*ServeMux).ServeHTTP\n\tnet/http/server.go:2688\ngithub.com/cometbft/cometbft/node.(*Node).startRPC.(*Cors).Handler.func9\n\tgithub.com/rs/cors@v1.8.3/cors.go:236\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2171\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.maxBytesHandler.ServeHTTP\n\tgithub.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_server.go:256\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.Serve.RecoverAndLogHandler.func1\n\tgithub.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_server.go:229\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2171\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:3142\nnet/http.(*conn).serve\n\tnet/http/server.go:2044\nheight: 41: voting power table has not been updated: unknown request"
RafilxTenfen commented 2 months ago

this is very bad, good finding :rocket: