Files
tendermint/rpc/core/abci.go
Aleksandr Bezobchuk 393a02a729 rpc: log update (#6825)
We INFO log every `ABCIQuery`. This can output a tremendous amount of noise in the logs, can cause cosmovisor to completely crash and slows down the node due to I/O. This log is completely unnecessary.

Let's get this backported into v0.43 and get that into v0.43 and v0.42 releases of the SDK


/cc @marbar3778
2021-08-14 01:40:14 +00:00

43 lines
1.2 KiB
Go

package core
import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/bytes"
"github.com/tendermint/tendermint/proxy"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types"
)
// ABCIQuery queries the application for some information.
// More: https://docs.tendermint.com/master/rpc/#/ABCI/abci_query
func (env *Environment) ABCIQuery(
ctx *rpctypes.Context,
path string,
data bytes.HexBytes,
height int64,
prove bool,
) (*ctypes.ResultABCIQuery, error) {
resQuery, err := env.ProxyAppQuery.QuerySync(ctx.Context(), abci.RequestQuery{
Path: path,
Data: data,
Height: height,
Prove: prove,
})
if err != nil {
return nil, err
}
return &ctypes.ResultABCIQuery{Response: *resQuery}, nil
}
// ABCIInfo gets some info about the application.
// More: https://docs.tendermint.com/master/rpc/#/ABCI/abci_info
func (env *Environment) ABCIInfo(ctx *rpctypes.Context) (*ctypes.ResultABCIInfo, error) {
resInfo, err := env.ProxyAppQuery.InfoSync(ctx.Context(), proxy.RequestInfo)
if err != nil {
return nil, err
}
return &ctypes.ResultABCIInfo{Response: *resInfo}, nil
}