Closed
Description
Bug Report
Setup
CometBFT version (use cometbft version
or git rev-parse --verify HEAD
if installed from source):
0.38.x, main,
Have you tried the latest version: yes/no
yes
What happened?
The performance optimizations introduced with tendermint/tendermint#7319 parse all numbers occurring in a query using ParseFloat
, including integers. While this solves the problem of parsing big integers, it might lead to a loss of precision.
One way to achieve this is introduce a TFNumber
and TIntNumber
in query/syntax/scanner
which would replace the current TNumber
type. The function scanNumber
already detects potential .
in the number.
What did you expect to happen?
Integers are parsed using either ParseInt
or parsed as big integers (for example by using math/big
).